<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8" isELIgnored="false"%>
    
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>customer list</title>
<style type="text/css">
  .even{ 
    background-color:gray;
  }
</style>
</head>
<body>
  <div style="margin-left:30%;padding-top:5%;">
   <table>
       <tr> 
            <td>uname</td>
            <td>salary</td>
            <td>birth</td>
            <td>sex</td>
            <td>favcs</td>
            <td>修改</td>
            <td>删除</td>
       </tr>
       <c:forEach items="${list}" var ="c" varStatus="now">
       <c:if test="${now.index%2==0 }">
            <tr class="even">
       </c:if>
       <c:if test="${now.index%2!=0 }">
            <tr class="odd">
       </c:if>
            <td>${c.uname }</td>
            <td>${c.salary }</td>
            <td>${c.birth }</td>
            <c:if test="${c.sex }">
            <td>男</td>
            </c:if>
            <c:if test="${!c.sex }">
            <td>女</td>
            </c:if>
            <td>${c.favcStr }</td>
            <td><a href="modify?id=${c.id }">修改</a></td>
            <td><a href="remove?id=${c.id }">删除</a></td>
         </tr>
      </c:forEach>
   
   
   </table>
   <a href="toregister">添加</a>
   </div>
</body>
</html>